package com.letoken.platform.repo.mall.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.letoken.platform.repo.mall.po.AppMallPromotion;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.Collection;
import java.util.List;

/**
 * <p>
 * 星推官用户 Mapper 接口
 * </p>
 *
 * @author author
 * @since 2023-06-05
 */
public interface AppMallPromotionMapper extends BaseMapper<AppMallPromotion> {



    @Select("select * from app_mall_promotion where user_id = #{userId} and level > 0 limit 1")
    AppMallPromotion getPromotionByUserId(@Param("userId") Integer userId);


    void updateLevelBatchById(@Param("list") List<AppMallPromotion> list);

}
